﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.ViewModel;

namespace HSE.Common
{
    public class SavePageBaseViewModel<T>: NotificationObject
    {
        public string TipInfo { get; set; }


        public ButtonInfo SaveToSave
        {
            get;
            set;
        }

        public ButtonInfo SaveToList
        {
            get;
            set;
        }

        public ButtonInfo Cancel
        {
            get;
            set;
        }



        public SavePageBaseViewModel()
        {
            this.SaveToSave = new ButtonInfo() { Alias = "保存后继续添加", Icon = "/HSE;component/Images/SaveToSave.png" };
            this.SaveToList = new ButtonInfo() { Alias = "保存后返回列表", Icon = "/HSE;component/Images/SaveToList.png" };
            this.Cancel = new ButtonInfo() { Alias = "取消", Icon = "/HSE;component/Images/Cancel.png" };

        }

        private T _saveModel;
        public T SaveModel
        {
            get
            {
                return this._saveModel;
            }
            set
            {
                this._saveModel = value;
                this.RaisePropertyChanged(typeof(T).Name);
            }
        }
        
    }
}
